myApp.controller('uploadController', function ($scope, $http) {
    $scope.uploadFile = function () {
        var form = new FormData();
        var file = document.getElementById("fileUpload").files[0];
        form.append('file', file);
        $.ajax({
            method: 'POST',
            url: '/uploadFile',
            data: form,
            headers: {'Content-Type': undefined},
            transformRequest: angular.identity
        }).success(function (data) {
            alert(data.message);
            console.log('upload success');
        }).error(function (data) {
            console.log('upload fail');
        })
    }
})